package br.com.lh.ura.database;

import java.io.Serializable;

import br.com.locaweb.pabx.core.models.SoundFile;

public class FlexSoundFile implements Serializable, Comparable<FlexSoundFile> {

	private static final long serialVersionUID = 1L;
	public Integer _soundId;
	public String label;
	public String data;

	public FlexSoundFile() {

	}

	public FlexSoundFile(SoundFile soundFile, String companyName) {
		_soundId = soundFile.getId();
		String soundName = soundFile.getName().split(".mp3")[0];
		data = companyName + "/" + soundFile.getSoundList().getName() + "/"
				+ soundName;
		label = soundName;
	}

	@Override
	public boolean equals(Object obj) {
		return ((FlexSoundFile) obj).label.equals(label);
	}

	@Override
	public int compareTo(FlexSoundFile o) {
		return label.compareTo(o.label);
	}

}
